home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / tls / tls085.solintel.Z / tls085.solintel / lib / vtcl / tests / dlist2.tcl < prev    next >
Encoding:
Text File  |  1995-07-20  |  868 b   |  51 lines

  1. # CVS $Id: dlist2.tcl,v 1.3 1995/02/03 16:54:34 zibi Exp $
  2. #
  3. # This is a visual test of drawn list, to compare it visually
  4. # against the list widget.
  5. #
  6.  
  7.  
  8. proc QuitCB {cbs} {
  9.    VtClose
  10.    exit 0
  11. }
  12.  
  13.  
  14. source tools.tcl
  15.  
  16.  
  17. set ap [VtOpen dd]
  18.  
  19. set fn [VtFormDialog $ap.form ]
  20.  
  21. set items { {0 first} {1 second} {2 third} {2 fourth} {1 fifth} {0 sixth} } 
  22.  
  23. set dl [VtDrawnList $fn.dl \
  24.         -iconList {./dir.px exec.px file.px} \
  25.     -CHARM_iconList {a b c} \
  26.     -formatList { \
  27.         {ICON 1} \
  28.         {STRING 25 5} \
  29.         {DATA } } \
  30.     -CHARM_formatList { \
  31.         {ICON 1} \
  32.         {STRING 25 2} \
  33.         {DATA } } \
  34.     -columns 15 \
  35.     -rows 6 \
  36.     -recordList $items ]
  37.  
  38. set lst [VtList $fn.lst \
  39.         -columns 15 -rows 6 -scrollBar 1\
  40.         -alignTop $dl \
  41.         -leftSide $dl \
  42.         -itemList $items ]
  43.  
  44. set b [ VtPushButton $fn.b \
  45.             -label "Quit" \
  46.             -callback "QuitCB" ]
  47.  
  48. VtShowDialog $fn
  49.  
  50. VtMainLoop
  51.